<?php if(!defined('IN_UCHOME')) exit('Access Denied'); ?><?php if(empty($_SGLOBAL['inajax'])) { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?=$_SC['charset']?>" />
<title><?php if($_TPL['titles']) { ?><?php if(is_array($_TPL['titles'])) { foreach($_TPL['titles'] as $value) { ?><?php if($value) { ?><?=$value?> - <?php } ?><?php } } ?><?php } ?><?php if($space) { ?><?=$space['username']?> - <?php } ?><?=$_SCONFIG['sitename']?> - Powered by UCenter Home</title>
<script language="javascript" type="text/javascript" src="source/script_common.js"></script>
<script language="javascript" type="text/javascript" src="source/script_menu.js"></script>
<script language="javascript" type="text/javascript" src="source/script_ajax.js"></script>
<style type="text/css">
@import url(template/<?=$_SC['template']?>/common.css);
<?php if(!empty($space['theme'])) { ?>
@import url(theme/<?=$space['theme']?>/style.css);
<?php } ?>
<?php if(!empty($space['css'])) { ?>
<?=$space['css']?>
<?php } ?>
</style>
<?php if($space['uid']) { ?>
<link rel="alternate" type="application/rss+xml" href="rss.php?uid=<?=$space['uid']?>" title="<?=$space['username']?>" />
<?php } ?>
<link rel="edituri" type="application/rsd+xml" title="rsd" href="xmlrpc.php?rsd=1" />
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div id="wrap">
<div id="header">
<h2><a href="index.php"><img src="<?=$_SCONFIG['sitelogo']?>" alt="<?=$_SCONFIG['sitename']?>" /></a></h2>
<?php if($_SGLOBAL['supe_uid']) { ?>
<ul id="menu">
<li><a href="space.php?do=home">首页</a><?php if($space['self'] && $space['credit']<10) { ?><a href="space.php?do=home&view=guide" class="edit">向导</a><?php } ?></li>
<li><a href="space.php">个人主页</a></li>
<li><a href="space.php?do=friend">好友</a><a href="javascript:;" onclick="openSub(this,'friend');" class="drop">&nbsp;</a></li>
<li><a href="network.php">随便看看</a><?php if(empty($_SCONFIG['showall'])) { ?><a href="space.php?do=home&view=all" class="edit">近况</a><?php } ?></li>
<li><a href="space.php?do=pm"><span id="span_newpm">私信</span><?php if(!empty($_SGLOBAL['member']['newpm'])) { ?><script>newpm();</script><?php } ?></a><a href="javascript:;" onclick="openSub(this,'pm');" class="drop">&nbsp;</a></li>
</ul>
<div id="op">
<a href="cp.php">设置</a><span class="pipe">|</span>
<a href="cp.php?ac=privacy">策略</a><span class="pipe">|</span>
<?php if($space['self'] && $space['credit']>=10) { ?><a href="space.php?do=home&view=guide">向导</a><span class="pipe">|</span><?php } ?>
<a href="cp.php?ac=common&op=logout">退出</a>
</div>
<?php } else { ?>
<div id="op">
<a href="index.php">首页</a><span class="pipe">|</span>
<a href="space.php">我的空间</a><span class="pipe">|</span>
<a href="help.php">帮助</a>
</div>
<?php } ?>
</div>
<div id="submenu">
<div id="subfriend" class="submenu">
<ul>
<li><a href="space.php?do=friend">好友列表</a></li>
<li><a href="space.php?do=friend&view=visitor">我的访客</a></li>
<li><a href="space.php?do=friend&view=trace">我的足迹</a></li>
<li><a href="space.php?do=friend&view=online">在线用户</a></li>
<li class="line"><a href="cp.php?ac=friend&op=find">寻找好友</a></li>
<li><a href="cp.php?ac=invite">邀请好友</a></li>
</ul>
</div>
<div id="subpm" class="submenu">
<ul>
<li><a href="space.php?do=pm">查看未读</a></li>
<li><a href="space.php?do=pm&view=inbox">收件箱</a></li>
<li><a href="space.php?do=pm&view=outbox">发件箱</a></li>
<li><a href="space.php?do=notice">通知</a></li>
<li class="line"><a href="cp.php?ac=pm">发送私信</a></li>
</ul>
</div>
</div>
<div id="content" class="s_clear">
<div id="side">
<?php if($_SGLOBAL['supe_uid']) { ?>
<ul id="app" class="app_list">
<li class="app-doing"><a href="space.php?do=doing">迷你博客</a></li>
<li class="app-blog"><a href="space.php?do=blog">日志</a><em><a href="cp.php?ac=blog">发表</a></em></li>
<li class="app-photo"><a href="space.php?do=album">相册</a><em><a href="cp.php?ac=upload">上传</a></em></li>
<li class="app-mtag"><a href="space.php?do=thread">话题</a><em><a href="cp.php?ac=thread">发起</a></em></li>
<li class="app-share"><a href="space.php?do=share">分享</a></li>

<?php if(is_array($_SGLOBAL['app'])) { foreach($_SGLOBAL['app'] as $key => $value) { ?>
<?php if($key != UC_APPID && $value['open']) { ?>
<li class="app-<?=$value['type']?>"><a href="space.php?do=app&appid=<?=$key?>" title="<?=$value['name']?>"><?=$value['name']?></a></li>
<?php } ?>
<?php } } ?>
</ul>
<?php } else { ?>
<?php if(empty($space['theme']) && empty($space['css'])) { ?>
<?php if(empty($_SGLOBAL['nologinform'])) { ?>
<form id="loginform" name="loginform" action="do.php?ac=login&ref" method="post">
<div style="padding: 10px;">
<p class="gray"><label for="username">用户名：</label></p>
<p><input type="text" name="username" id="username" class="t_input" value="<?=$membername?>" size="15" style="width: 100px;" /></p>
<p class="gray"><label for="password">密　码：</label></p>
<p><input type="password" name="password" id="password" class="t_input" size="15" style="width: 100px;" /></p>
<p><input type="checkbox" id="cookietime" name="cookietime" value="315360000" checked /> <label for="cookietime">下次自动登录</label></p>
<p style="padding-top: 4px;">
<input type="hidden" name="refer" value="space.php?do=home" />
<input type="submit" id="loginsubmit" name="loginsubmit" value="登录" class="submit" style="padding: 0; width: 50px;" />
<a href="do.php?ac=lostpasswd">找回密码</a>
</p>
</div>
</form>
<?php } ?>
<ul class="sidelink">
<li><a href="do.php?ac=register"><strong>注册</strong>期待您的入住</a></li>
<li><a href="help.php"><strong>页面介绍</strong>了解一下您的家</a></li>
<?php if($_SCONFIG['networkpublic']) { ?><li><a href="network.php"><strong>随便看看</strong>看看大家在做什么</a></li><?php } ?>
</ul>
<?php } ?>
<?php } ?>

<?php if(empty($space['theme']) && empty($space['css'])) { ?>
<?php adshow('leftside'); ?><!-- 左侧栏广告-->
<?php } ?>
</div>
<div id="mainarea">
<?php } else { ?>
<?php obclean();
	@header("Expires: -1");
	@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
	@header("Pragma: no-cache");
	@header("Content-type: application/xml; charset=$_SC[charset]");
	echo '<'."?xml version=\"1.0\" encoding=\"$_SC[charset]\"?>\n";
	echo "<root><![CDATA["; ?>
<?php } ?>
<div class="c_header">
<ul class="tabs">
<li<?=$actives['profile']?>><a href="cp.php?ac=profile">个人资料</a></li>
<li<?=$actives['mtag']?>><a href="cp.php?ac=mtag">我的选吧</a></li>
<li<?=$actives['space']?>><a href="cp.php?ac=space">空间属性</a></li>
<li<?=$actives['theme']?>><a href="cp.php?ac=theme">主页风格</a></li>
<li<?=$actives['advance']?>><a href="cp.php?ac=advance">高级管理</a></li>
</ul>
</div>

<?php if(empty($_GET['op'])) { ?>
<form method="post" action="cp.php?ac=space&op=" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>修改密码</h2>
</caption>
<tr>
<th width="100">旧密码</th>
<td><input type="password" id="password" name="password" value="" class="t_input" /></td>
</tr>
<tr>
<th>新密码</th>
<td><input type="password" id="newpasswd1" name="newpasswd1" value="" class="t_input"></td>
</tr>
<tr>
<th>确认新密码</th>
<td><input type="password" id="newpasswd2" name="newpasswd2" value="" class="t_input"></td>
</tr>
<tr>
<th>&nbsp;</th>
<td><input type="submit" name="pwdsubmit" value="修改密码" class="submit" /></td>
</tr>
</table>

<?php if($_SCONFIG['allowdomain'] && $_SCONFIG['domainroot'] && $domainlength) { ?>
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>空间域名</h2>
<p>域名可使用最少 <?=$domainlength?> 个英数字，最多 30 个英数字，且必须字母开头。</p>
</caption>
<tr>
<th width="100">空间域名</th>
<td>http://<input type="text" name="domain" value="<?=$space['domain']?>" size="10" />.<?=$_SCONFIG['domainroot']?></td>
</tr>
<tr>
<th>&nbsp;</th>
<td><input type="submit" name="spacesubmit" value="修改空间名" class="submit" /></td>
</tr>
</table>
<?php } ?>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>空间属性</h2>
</caption>
<tr>
<th width="100">积分</th>
<td><?=$space['credit']?> &nbsp; [<a href="cp.php?ac=space&op=credit">查看规则</a>] &nbsp; [<a href="cp.php?ac=space&op=exchange">积分兑换</a>]</td>
</tr>
<tr>
<th>用户组</th>
<td><?=$space['grouptitle']?></td>
</tr>
<tr>
<th>空间容量</th>
<td> 最大空间 <?=$maxattachsize?>, 已用 <?=$space['attachsize']?> (<?=$percent?>%) &nbsp; [<a href="cp.php?ac=space&op=addsize">用积分兑换空间</a>]</td>
</tr>
</table>
</form>

<?php } elseif($_GET['op'] == 'credit') { ?>

<form method="post" action="cp.php?ac=space" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>积分</h2>
</caption>
<tr><th width="30%">目前您的积分数</th><td><?=$space['credit']?> <?php echo getstar($space[credit]); ?></td></tr>
<tr><th width="30%">星星升级提示</th><td>您还需 <strong><?php echo $_SCONFIG['starcredit']-fmod($space[credit], $_SCONFIG['starcredit']); ?></strong> 个积分可升级一颗星星</td></tr>
<tr><th>所在的用户组</th><td><?=$space['grouptitle']?></td></tr>
</table>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>积分增加</h2>
<p>以下操作会使你的积分增加</p>
</caption>
<tr><th width="30%">发布日志</th><td>+ <?=$get['blog']?></td></tr>
<tr><th>发布评论/留言</th><td>+ <?=$get['comment']?></td></tr>
<tr><th>发起话题</th><td>+ <?=$get['thread']?></td></tr>
<tr><th>发布回帖</th><td>+ <?=$get['post']?></td></tr>
<tr><th>邀请好友注册成功</th><td>+ <?=$get['invite']?></td></tr>
</table>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>积分减少</h2>
<p>以下操作会扣减你的积分</p>
</caption>
<tr><th width="30%">日志被删除</th><td>- <?=$pay['blog']?></td></tr>
<tr><th>评论/留言被删除</th><td>- <?=$pay['comment']?></td></tr>
<tr><th>话题被删除</th><td>- <?=$pay['thread']?></td></tr>
<tr><th>回帖被删除</th><td>- <?=$pay['post']?></td></tr>
<tr><th>获取注册邀请码</th><td>- <?=$pay['invite']?></td></tr>
<tr><th>搜索一次</th><td>- <?=$pay['search']?></td></tr>
<tr><th>增加1M的上传空间</th><td>- <?=$pay['attach']?></td></tr>
<tr><th>日志导入</th><td>- <?=$pay['xmlrpc']?></td></tr>
</table>

<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>用户组与积分对应关系</h2>
<p>用户组越高，所拥有的权限会越多</p>
</caption>
<tr><th width="30%">用户组名</th><td>积分范围</td></tr>
<?php if(is_array($groups)) { foreach($groups as $value) { ?>
<tr><th><?=$value['grouptitle']?></th><td><?=$value['creditlower']?> ~ <?=$value['credithigher']?></td></tr>
<?php } } ?>
</table>
</form>


<?php } elseif($_GET['op'] == 'exchange') { ?>

<form method="post" action="cp.php?ac=space&op=exchange" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>积分兑换</h2>
</caption>
<tr><th width="30%">目前您的积分数</th><td> <?=$space['credit']?></td></tr>
<tr>
<th><label for="password">密码</label></th>
<td><input type="password" name="password" class="t_input" /></td>
</tr>
<tr>
<th>支出积分</th>
<td><input type="text" id="amount" name="amount" value="0" class="t_input" onkeyup="calcredit();" /></td>
</tr>
<tr>
<th>兑换成</th>
<td>
<input type="text" id="desamount" value="0" class="t_input" disabled />&nbsp;&nbsp;
<select name="tocredits" id="tocredits" onChange="calcredit();">
<?php if(is_array($_CACHE['creditsettings'])) { foreach($_CACHE['creditsettings'] as $id => $ecredits) { ?>
<?php if($ecredits['ratio']) { ?>
<option value="<?=$id?>" unit="<?=$ecredits['unit']?>" title="<?=$ecredits['title']?>" ratio="<?=$ecredits['ratio']?>"><?=$ecredits['title']?></option>
<?php } ?>
<?php } } ?>
</select>
</td>
</tr>
<tr>
<th>兑换比率</th>
<td><span class="bold">1</span>&nbsp;<span id="orgcreditunit">积分</span><span id="orgcredittitle"></span>&nbsp;兑换&nbsp;<span class="bold" id="descreditamount"></span>&nbsp;<span id="descreditunit"></span><span id="descredittitle"></span></td>
</tr>
<tr><th>&nbsp;</th><td><input type="submit" name="exchangesubmit" value="兑换积分" class="submit"></td></tr>
</table>
</form>
<script type="text/javascript">
function calcredit() {
tocredit = $('tocredits')[$('tocredits').selectedIndex];
$('descreditunit').innerHTML = tocredit.getAttribute('unit');
$('descredittitle').innerHTML = tocredit.getAttribute('title');
$('descreditamount').innerHTML = Math.round(1/tocredit.getAttribute('ratio') * 100) / 100;
$('amount').value = $('amount').value.toInt();
if($('amount').value != 0) {
$('desamount').value = Math.floor(1/tocredit.getAttribute('ratio') * $('amount').value);
} else {
$('desamount').value = $('amount').value;
}
}
String.prototype.toInt = function() {
var s = parseInt(this);
return isNaN(s) ? 0 : s;
}
calcredit();
</script>
<?php } elseif($_GET['op'] == 'addsize') { ?>

<form method="post" action="cp.php?ac=space&op=addsize" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
<caption>
<h2>积分兑换空间容量</h2>
</caption>
<tr><th width="30%">附件空间使用</th><td> 已用 <?=$space['attachsize']?> / <?=$maxattachsize?> ，使用比例 <?=$sizewidth?>%
<table cellspacing="0" cellpadding="0" width="100%"><tr><?php if($sizewidth) { ?><td width="<?=$sizewidth?>%" bgcolor="red">&nbsp;</td><?php } ?><td bgcolor="green">&nbsp;</td></tr></table>
</td></tr>
<tr><th>拥有的积分</th><td><?=$space['credit']?></td></tr>
<tr><th>兑换规则</th><td>兑换1M的上传空间，需要积分数: <?=$pay['attach']?></td></tr>
<tr><th>要兑换的空间大小</th><td><input type="text" name="addsize" value="1" size="5"> M</td></tr>
<tr><th>&nbsp;</th><td><input type="submit" name="addsizesubmit" value="兑换" class="submit"></td></tr>
</table>
</form>

<?php } ?>
<div class="f_status s_clear">
<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</div>
<?php if(empty($_SGLOBAL['inajax'])) { ?>
</div>
</div>

<div id="footer">
<p class="copyright" title="<?php echo debuginfo(); ?>">
<?=$_SCONFIG['sitename']?> &nbsp; <a href="mailto:<?=$_SCONFIG['adminemail']?>">联系我们</a>
<?php if($_SCONFIG['miibeian']) { ?> &nbsp;<a  href="http://www.miibeian.gov.cn" target="_blank"><?=$_SCONFIG['miibeian']?></a><?php } ?>
 &nbsp; Powered by <a  href="http://u.discuz.net" target="_blank">UCenter Home</a> <span title="<?php echo X_RELEASE; ?>"><?php echo X_VER; ?></span>
 <?php if(!empty($_SCONFIG['licensed'])) { ?><a  href="http://license.comsenz.com/?pid=7&host=<?=$_SERVER['HTTP_HOST']?>" target="_blank">Licensed</a><?php } ?>
 &copy; 2001-2008 <a  href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>
</p>
</div>
</div>
<script language="javascript" type="text/javascript" src="source/script_manage.js"></script>
<?php adshow('footer'); ?><!-- 页脚广告-->

<?php if($_SGLOBAL['supe_uid']) { ?>
<?php if(!isset($_SCOOKIE['checkpm'])) { ?>
<script type="text/javascript" src="cp.php?ac=pm&op=checknewpm&rand=<?php echo rand(0,999) ?>"></script>
<?php } ?>
<?php if(!isset($_SCOOKIE['synfriend'])) { ?>
<script type="text/javascript" src="cp.php?ac=friend&op=syn&rand=<?php echo rand(0,999) ?>"></script>
<?php } ?>
<?php } ?>
</body>
</html>
<?php } ?>
<?php ob_out(); ?><?php subtplcheck('template/default/cp_space|template/default/header|template/default/cp_header|template/default/footer', '1229241142', 'template/default/cp_space'); ?>